<%@ page contentType="text/html;charset=utf-8" language="java"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> 
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<html:html>
<script type="text/javascript" src="pOperate/Bs_Tree.class.js"></script>
<script type="text/javascript" src="pOperate/Bs_TreeElement.class.js"></script>
<script type="text/javascript" src="pOperate/Bs_Array.class.js"></script>
<head>
		<META http-equiv=Content-Type content="text/html; charset=utf-8">
		<LINK href="../styles/sciencee.css"  type=text/css rel=stylesheet>
		<LINK href="xtree.css"  type=text/css rel=stylesheet>
		<style type="text/css"></style>
		<title>CGProject</title>
		<html:base/>
</head>
<%String project_id = (String)request.getAttribute("projectId");%>

<body>

<script language="javaScript" src="../js/calendar.js"></script>
<table border="0" width="100%" cellspacing="1" id="table5" height="59" style="border: 1px solid #C0C0C0">
	<tr>
		<td height="25" align="left" bgcolor="#EEF2F7" colspan="7" width="100%"  style=" border-bottom:1px dotted #C0C0C0; ">&nbsp;<b><bean:message key="project"/></b>&nbsp;&nbsp;&nbsp;&nbsp;</td>
	</tr>
	<tr>
		<td height="29" align="left" width="10%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
		&nbsp;<b><bean:message key="project.name"/></b></td>
		<td height="29" align="left" width="25%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
		<b>&nbsp;<bean:message key="project.description"/></b></td>
		<td height="29" align="left" width="15%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
		<b>&nbsp;<bean:message key="project.createtime"/></b></td>
		<td height="29" align="left" width="15%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
		<b>&nbsp;<bean:message key="project.planstarttime"/></b></td>
		<td height="29" align="left" width="15%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
		<b>&nbsp;<bean:message key="project.planfinishtime"/></b></td>
		<td height="29" align="left" width="10%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
		&nbsp;<b><bean:message key="project.status"/></b></td>
		<td height="29" align="left" width="20%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
		&nbsp;<b></b></td>

	</tr>
	<logic:iterate id="element" name="Company" property="projects">
	<logic:notEqual name="element" property="projectId" value="<%=project_id%>">
	<tr>
		<td height="29" align="left" width="10%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
		&nbsp;<html:link page="/detail.do"  paramId="projectId" paramName="element" paramProperty="projectId"><u><bean:write name="element" property="projectName"/></u></html:link></td>
		<td height="29" align="left" width="25%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
		&nbsp;<bean:write name="element" property="description"/></td>
		<td height="29" align="left" width="15%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
		&nbsp;<bean:write name="element" property="projectCreated"/></td>
		<td height="29" align="left" width="15%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
		&nbsp;<bean:write name="element" property="planStartTime"/></td>
		<td height="29" align="left" width="15%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
		&nbsp;<bean:write name="element" property="planFinishTime"/></td>
		<td height="29" align="left" width="10%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
		&nbsp;
		<script language=javascript>
			var s=top.changeColor("<bean:write name="element" property="status.statusDisplay"/>");
			document.write(s);
		</script>
		</td>
		<td height="29" align="left" width="20%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
		&nbsp;<html:link page="/index.do"  paramId="projectId" paramName="element" paramProperty="projectId">[<bean:message key="basicmodify"/>]</html:link>
		&nbsp;&nbsp;<html:link page="/delete.do"  paramId="project_Id" paramName="element" paramProperty="projectId" onclick="return   confirm('Confirm Delete')">[<bean:message key="delete"/>]</html:link>&nbsp;</td>
		
	</tr>
	</logic:notEqual>
	<logic:equal name="element" property="projectId" value="<%=project_id%>">
	<html:form action="/modProject">
	<html:hidden property="id"/>
	<tr>
		<td height="29" align="left" width="10%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
		&nbsp;<html:text property="name" size="20"/></td>
		<td height="29" align="left" width="25%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
		&nbsp;<html:textarea property="description" rows="2" cols="38"/></td>
		<td height="29" align="left" width="15%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
		&nbsp;<bean:write name="element" property="projectCreated"/></td>
		<td height="29" align="left" width="15%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
		&nbsp;<html:text property="startTime" size="15" readonly="true" onblur="DeleteMonthView(startTime)" />
		<input type="button" value="日期" name="calButton" onclick="CreateMonthView(startTime)"  style="font-family: Tahoma; font-size: 11px" ></td>
		<td height="29" align="left" width="15%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
		&nbsp;<html:text property="finishTime" size="15" readonly="true" onblur="DeleteMonthView(finishTime)" />
		<input type="button" value="日期" name="calButton" onclick="CreateMonthView(finishTime)"  style="font-family: Tahoma; font-size: 11px" ></td>
		<td height="29" align="left" width="10%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
		&nbsp;
		<script language=javascript>
			var s=top.changeColor("<bean:write name="element" property="status.statusDisplay"/>");
			document.write(s);
		</script>
		</td>
		<td height="29" align="left" width="20%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; ">
		<html:submit><bean:message key="basicmodify"/></html:submit></td>
	</tr>
	</html:form>
	</logic:equal >
	
	</logic:iterate>
</table>
<html:form action="/addProject">
<table border="0" width="100%" cellspacing="0" id="tabletable" height="59" cellpadding="0">
	<tr bgcolor="#EEF2F7" >
		<td height="20" colspan=4 style="border-bottom:1px dotted #C0C0C0;"><b>AddProject</b></td>
	</tr>

	<tr bgcolor="#EEF2F7">
		<td height="20" width="12%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; font-family:Tahoma; font-size:11px">
		<bean:message key="project.name"/></td>
		<td height="20" width="15%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; font-family:Tahoma; font-size:11px">
		<bean:message key="planstarttime"/></td>
		<td height="20" width="15%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; font-family:Tahoma; font-size:11px">
		<bean:message key="planfinishtime"/></td>
		<td height="20" width="50%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; font-family:Tahoma; font-size:11px">
		<bean:message key="description"/></td>
	</tr>
	<tr>
		<td height="20" width="12%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; font-family:Tahoma; font-size:11px">
		<html:text property="name" size="24" style="border:1px solid #FFFFFF; font-family: Tahoma; font-size: 11px; padding-left:4px; padding-right:4px; padding-top:1px; padding-bottom:1px"/></td>
		<td height="20" width="15%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; font-family:Tahoma; font-size:11px">
		<html:text property="startTime" size="20" readonly="true" onblur="DeleteMonthView(startTime)" style="border:1px solid #FFFFFF; font-family: Tahoma; font-size: 11px; padding-left:4px; padding-right:4px; padding-top:1px; padding-bottom:1px"/>
		<input type="button" value="DATE" name="calButton" onclick="CreateMonthView(startTime)"  style="font-family: Tahoma; font-size: 11px" ></td>
		<td height="20" width="15%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; font-family:Tahoma; font-size:11px">
		<html:text property="finishTime" size="20" readonly="true" onblur="DeleteMonthView(finishTime)"style="border:1px solid #FFFFFF; font-family: Tahoma; font-size: 11px; padding-left:4px; padding-right:4px; padding-top:1px; padding-bottom:1px"/>
		<input type="button" value="DATE" name="calButton1" onclick="CreateMonthView(finishTime)"  style="font-family: Tahoma; font-size: 11px" ></td>
		<td height="20" width="50%" style="border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; font-family:Tahoma; font-size:11px">
		<html:text property="description" size="100" style="border:1px solid #FFFFFF; font-family: Tahoma; font-size: 11px; padding-left:4px; padding-right:4px; padding-top:1px; padding-bottom:1px"/></td>

	</tr>
	<tr>
		<td height="20" width="100%" style="border-left:1px dotted #C0C0C0; border-right:1px dotted #C0C0C0; border-bottom:1px dotted #C0C0C0; font-family:Tahoma; font-size:11px" colspan="4">
		<input type="button" value="Submit" name="B1" style="font-family: Tahoma; font-size: 11px" onclick="submitAddProject()"></td>
	</tr>
</table>
</html:form>
</body>
</html:html>
<script language="javascript">
function submitAddProject()
{
	if(document.addProjectForm.name.value=="")
	{
		alert("Please input projectname");
		return
	}
	document.addProjectForm.submit();

}
</script>